const { knex, TABLE_NAME } = require('./db');
const client = require('./redisdb');


module.exports.knex = knex;
module.exports.TABLE_NAME = TABLE_NAME;


// 先初始化redis再初始化mysql
client.connect().then(() => {
  console.log('start initialize mysql');
  require('./worker');
  require('./tenant');
  require('./organization');
  require('./user');
  require('./contract');
  require('./notice');
  require('./send');
  require('./settings');
  require('./tenantSignRecord');
  require('./workerSignRecord');
  require('./upgrade')();
});

